<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>{{ title }}</title>
</head>
<body>
<h1>{{ title }}</h1>
<hr/>
<form method="post">
  {% csrf_token %}
  {#    <label>类别名称</label>#}
  {#  <input type="text" name="name">#}
  {#  <br/>#}
  {#  <label>类别描述</label>#}
  {#  <input type="text" name="comment">#}
  {#  <br/>#}
  {#  <input type="submit" value="保存">#}
  {#  {{ form }}#}
  {% for field in form %}
    {% for error in field.errors %}
      <p style="color: red">
        {{ error }}
      </p>
    {% endfor %}
    {% if field.field.required %}<span style="color: red">*</span>{% endif %}
    <label>{{ field.label }}</label>
    {{ field }} <br/>
  {% endfor %}
  <input type="submit" value="保存">
</form>
</body>
</html>
